<?php

class SyllabusPeer extends BaseSyllabusPeer
{
	public static function getSyllabusWithLevel( $level_id, $lang_current, $start=1, $limit = 10 )
	{
	//				->with('I18n')
		return DbFinder::from('Syllabus a')
				->with('I18n')
				->where('a.levelId', $level_id  )
				->orderBy('a.id', 'Asc')
				//->useCache(sfConfig::get('sf_cache'), 200)
				->paginate($start, $limit);
				;	
	}
	//get classes have levelID
	public static function getLevelNameById( $level_id )
	{
		$record = DbFinder::from('Level a')
				->with('I18n')
				->where('a.levelStatus',1)
				->where('a.Id', $level_id  )
				->findOne()
				;
		if( isset($record) )
			return $record->getLevelName();
	}
}
